#pragma once
#include <iostream>
using namespace std;
#include <vector>

namespace bit
{
	template<class T,class Container = vector<T>>
	class stack
	{
	public:
		template<class InputIterator>
		stack(InputIterator first, InputIterator last)
			:_c(first, last)
		{

		}
		stack()
			:_c()
		{

		}
		void push(const T& val)
		{
			_c.push_back(val);
		}

		T& top()
		{
			return _c.back();
		}
		const T& top()const
		{
			return _c.back();
		}
		void pop()
		{
			_c.pop_back();
		}
		size_t size()const
		{
			return _c.size();
		}
		bool empty()const
		{
			return _c.size() == 0;
		}
	private:
		Container _c;
	};

	template<class T,class Container = vector<T>>
	class queue
	{
	public:
		template<class InputIterator>
		queue(InputIterator first, InputIterator last)
			:_c(first, last)
		{

		}
		queue()
			:_c()
		{}

		void push(const T& val)
		{
			_c.push_back(val);
		}

		T& top()
		{
			return _c.front();
		}
		const T& top()const
		{
			return _c.front();
		}
		void pop()
		{
			_c.erase(_c.begin());
		}
		size_t size()const
		{
			return _c.size();
		}
		bool empty()const
		{
			return _c.size() == 0;
		}
	private:
		Container _c;
	};
}